package com.carsa.blackberry.domain.services.webServices;

import java.util.Vector;

/**
 * @author Nahuel Barrios.
 * @since 11/08/2010.
 * @version 1.0
 */
public interface WebService {

    /**
     * @return The result of the Web Service call. If the Web Service doesn't response anything, then the return value
     *         for this method must be a {@link Boolean} object with the <code>true</code> value. Also, if there is any
     *         error or problem invoking the Web Service, then the return value should be <code>null</code>.
     */
    public Object invokeWebService();

    /**
     * @return The result of the Web Service call. If the Web Service doesn't response anything, then the return value
     *         for this method must be a {@link Boolean} object with the <code>true</code> value. Also, if there is any
     *         error or problem invoking the Web Service, then the return value should be be <code>null</code>.
     */
    public Object invokeWebService(Object parameters);

    /**
     * @param parametersArray
     *            An {@link Object}[] containing the parameters to parse for then add them to the Web Service call.
     * @return The result of the Web Service call. If the Web Service doesn't response anything, then the return value
     *         for this method must be a {@link Boolean} object with the <code>true</code> value. Also, if there is any
     *         error or problem invoking the Web Service, then the return value should be <code>null</code>.
     */
    public Object invokeWebService(Object[] parametersArray);

    /**
     * @param xmlParameters
     *            A {@link String} in XML format containing the parameters to parse for then add to the Web Service
     *            call.
     * @return An {@link Object} array containing each parameter for the Web Service call in the order that they have to
     *         be setted.
     */
    public Object[] parseParameters(String xmlParameters);

    /**
     * @param parameters
     *            A {@link Vector} containing the parameters to parse for then add them to the Web Service call.
     * @return An {@link Object} array containing each parameter for the Web Service call in the order that they have to
     *         be setted.
     */
    public Object[] parseParameters(Vector parameters);

    /**
     * @return A {@link String} with the Web Service's name (unique for the application).
     */
    public String getName();

}
